class Student:
    def __init__(self):
        self.name = ''
        self.age = 0
        self.gender = ''
        self.phone = ''


g1 = Student()  # 通过实例化方式使用一个类
g1.name = '张三'
g1.age = 18
g1.gender = '女'
g1.phone = '133099090'

g2 = Student()  # 通过实例化方式使用一个类
g2.name = '李四'
g2.age = 14
g2.gender = '女'
g2.phone = '135099996'

students = []
students.append(g1)
students.append(g2)

# 修改/更新
for item in students:
    if item.name == '李四':
        item.age = 15








